﻿using GroceryList.Domain.Repositories;
using GroceryList.Front.Web.Installers;
using Xunit;
using Castle.Windsor;

namespace GroceryList.Test
{
    public class RepositoryInstallerTest
    {
        private readonly IWindsorContainer _containerWithControllers;

        public RepositoryInstallerTest()
        {
            _containerWithControllers =
                new WindsorContainer().
                    Install(new PersistenceInstaller()).
                    Install(new RepositoryInstaller());

        }

        [Fact]
        public void CanCreateARepositoryObjectByUsingRepositoryInstaller()
        {
            Assert.NotNull(_containerWithControllers.Kernel.Resolve<IProductoRepository>());
        }
    }
}
